package com.whz.bus.debezium;

import lombok.Getter;
import org.springframework.context.ApplicationEvent;

/**
 * @author whz
 */
@Getter
public class DebeziumEvent extends ApplicationEvent {
    private static final long serialVersionUID = 8261661630568036646L;

    private final String message;

    /**
     * Create a new {@code ApplicationEvent}.
     *
     * @param source the object on which the event initially occurred or with
     *               which the event is associated (never {@code null})
     */
    public DebeziumEvent(final Object source, String message) {
        super(source);
        this.message = message;
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
        throw new java.io.NotSerializableException("tech.tongyu.binlog.bus.debezium.DebeziumEvent");
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
        throw new java.io.NotSerializableException("tech.tongyu.binlog.bus.debezium.DebeziumEvent");
    }
}